<template>
  <div>
    <el-breadcrumb>
      <el-breadcrumb-item>员工评价管理</el-breadcrumb-item>
      <el-breadcrumb-item>员工评价详情</el-breadcrumb-item>
    </el-breadcrumb>
    <RemarksDetails :remarks="memberDetails.remarks" />
  </div>
</template>

<script setup>
import {reactive, ref, inject, onMounted} from "vue";
import {useRoute, useRouter} from "vue-router";
import RemarksDetails from "@/components/RemarksDetails.vue";

const route = useRoute();
const router = useRouter();
const axios = inject("axios");

const memberDetails = reactive({
  gmId: "",
  gmName: "",
  gmCode: "",
  password: "",
  provinceId: "",
  cityId: "",
  tel: "",
  remarks: "",
});

const getMemberDetails = async () => {
  const gmId = route.query.gmId; // 修改为 gmId
  const response = await axios.get(`gridMember/getGridMemberDetails?gmId=${gmId}`);
  Object.assign(memberDetails, response.data);
};

onMounted(() => {
  getMemberDetails();
});
</script>